<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>

	<form class="form-horizontal" role="form" id="myform">
		<div class="form-title">
           	密码修改
        </div>
		<div class="form-group">
			<label for="oldPassWord" class="col-sm-3 control-label">原密码</label>
			<div class="col-sm-9">
				<input type="password" class="form-control" id="oldPwd" name="oldPassWord" placeholder="请填写原密码">
			</div>
		</div>
		<div class="form-group">
			<label for="newPassWord" class="col-sm-3 control-label">新密码</label>
			<div class="col-sm-9">
				<input type="password" class="form-control" id="newPwd" name="newPassWord" placeholder="请填写密码">
			</div>
		</div>
		<div class="form-group">
			<label for="confirmPassword" class="col-sm-3 control-label">确认密码</label>
			<div class="col-sm-9">
				<input type="password" class="form-control" id="confirmPwd" name="confirmPassword" placeholder="确认密码，请保持与新密码一致">
			</div>
		</div>
		<div class="form-group text-center">
	        <button type="button" class="btn btn-primary" onclick="server.submitForm('myform','/manage/passwordEdit',formVal,null,null,null)">保存</button>
	        <button type="button" class="btn btn-danger" onclick="server.closeModalBox()">关闭</button>
	     </div>
	</form>
	<script type="text/javascript">
		function formVal(){
			if(verify.isNull($("#oldPwd").val())){
				server.alert("请输入原密码");
				return false;
			}
			
			if(!verify.isPwd($("#newPwd").val())){
				server.alert("密码由英文字母、数字组成，且长度在5-20位之间 ");
				return false;
			}
			if(!verify.isEqual($("#newPwd").val(),$("#confirmPwd").val())){
				server.alert("两次密码输入的不一致 ");
				return false;
			}
			return true;
		}		
	</script>
